<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "tk_application".
 *
 * @property int $aid
 * @property int $app_id 实例id
 * @property string $name 应用名称
 * @property string $app_key
 * @property string $aes_key
 * @property string $aes_iv
 * @property string $remake
 * @property string $configuration
 * @property string $status 1-启用，2-禁用
 * @property string $create_time
 */
class Application extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'tk_application';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['app_id', 'name', 'app_key', 'aes_key', 'aes_iv', 'configuration'], 'required'],
            [['app_id'], 'integer'],
            [['status'], 'string'],
            [['create_time'], 'safe'],
            [['name', 'app_key'], 'string', 'max' => 32],
            [['aes_key', 'aes_iv'], 'string', 'max' => 16],
            [['remake'], 'string', 'max' => 255],
            [['configuration'], 'string', 'max' => 1024],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'aid' => 'Aid',
            'app_id' => 'App ID',
            'name' => 'Name',
            'app_key' => 'App Key',
            'aes_key' => 'Aes Key',
            'aes_iv' => 'Aes Iv',
            'remake' => 'Remake',
            'configuration' => 'Configuration',
            'status' => 'Status',
            'create_time' => 'Create Time',
        ];
    }
}
